package cn.edu.scnu.semart.model.goods;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 用户点赞实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_like")
public class Like {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 商品ID
     */
    @TableField("goods_id")
    private Integer goodsId;

    /**
     * 点赞类型：1-商品点赞，2-评论点赞
     */
    @TableField("like_type")
    private Integer likeType;

    /**
     * 目标ID（商品ID或评论ID）
     */
    @TableField("target_id")
    private Integer targetId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 逻辑删除标志：0-未删除，1-已删除
     */
    @TableLogic
    @TableField("deleted")
    private Integer deleted;
} 